package com.base.system.jpa.repository;

import com.base.system.jpa.entity.JpaUserRole;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;

import java.util.List;

public interface UserRoleRepository extends JpaRepository<JpaUserRole, Long>, JpaSpecificationExecutor<JpaUserRole> {
    List<JpaUserRole> findAllByUserId(Long userId);

    void deleteAllByUserId(Long userId);
}
